class PutawayContainers {
  List<PutawayContainer> tallyFinishContainers = new List(); //理货完成待上架柜
  List<PutawayContainer> tallyContainers = new List(); //理货中柜

  PutawayContainers.fromJson(Map<dynamic, dynamic> json)
      : tallyFinishContainers = json['tallyFinishContainers'] == null ? null : (new List<dynamic>.from(json['tallyFinishContainers']).map((userJson) => PutawayContainer.fromJson(userJson)).toList()),
        tallyContainers = json['tallyContainers'] == null ? null : (new List<dynamic>.from(json['tallyContainers']).map((userJson) => PutawayContainer.fromJson(userJson)).toList());
}

class PutawayContainer {
  int warehousingNotifyId; //预报id
  String uniqId; //系统编号
  String containerNo; //柜号
  String tallyFinishDate; //理货完成日期
  bool isShow=false;
  List<PutawayLPNSkus> containerDetail = new List(); //理货中柜;//理货完成日期

  PutawayContainer.fromJson(Map<dynamic, dynamic> json)
      : warehousingNotifyId = json['warehousingNotifyId'] as int,
        uniqId = json['uniqId'] as String,
        containerNo = json['containerNo'] as String,
        tallyFinishDate = json['tallyFinishDate'] as String,
        isShow = json['isShow'] as bool,
        containerDetail = json['containerDetail'] == null ? null : (new List<dynamic>.from(json['containerDetail']).map((userJson) => PutawayLPNSkus.fromJson(userJson)).toList());
}

class PutawayLPNSkus {
  String lpn; //预报id
  String wholeCode = ""; //预报id
  String sku; //sku
  int qty;
  int quantity;

  PutawayLPNSkus(this.lpn, this.wholeCode, this.sku, this.qty,this.quantity); //数量

  PutawayLPNSkus.fromJson(Map<dynamic, dynamic> json)
      : lpn = json['lpn'] as String,
        wholeCode = json['wholeCode'] as String,
        sku = json['sku'] as String,
        qty = json['qty'] as int,
        quantity = json['quantity'] as int;
}

class PutawayContainerLPN {
  List<PutawayLpn> pendingPutawayLpns = new List(); //理货完成待上架柜
  List<PutawayLpn> putawayLpns = new List(); //理货中柜

  PutawayContainerLPN.fromJson(Map<dynamic, dynamic> json)
      : pendingPutawayLpns = json['pendingPutawayLpns'] == null ? null : (new List<dynamic>.from(json['pendingPutawayLpns']).map((userJson) => PutawayLpn.fromJson(userJson)).toList()),
        putawayLpns = json['putawayLpns'] == null ? null : (new List<dynamic>.from(json['putawayLpns']).map((userJson) => PutawayLpn.fromJson(userJson)).toList());
}

class PutawayLpn{
  String containerNo;//预报id
  String lpn;//预报id
  String wholeCode;//库位
  List<PutawaySku> skus = new List();
  PutawayLpn.fromJson(Map<dynamic, dynamic> json)
      : containerNo = json['containerNo'] as String,
        lpn = json['lpn'] as String,
        wholeCode = json['wholeCode'] as String,
        skus = json['skus'] == null ? null : (new List<dynamic>.from(json['skus']).map((userJson) => PutawaySku.fromJson(userJson)).toList());
}

class PutawaySku {
  String sku;//sku
  int qty;

  PutawaySku(this.sku, this.qty); //数量

  PutawaySku.fromJson(Map<dynamic, dynamic> json)
      : sku = json['sku'] as String,
        qty = json['qty'] as int;
}


class PutatayPOL3{
  List<PutawayLpn> tallyLpnInfoRespVos;
  List<PutawayLPNSkus> skuAndQtyReqVos;
  List<PutawayLPNSkus> skus;
  String prescribedLocation;
  String lpn;
  int type;// 转运类型 0非转运 1转运
  bool isWhiteList;//是否白名单 true：是(走mnr2) false:不是(走mnr1)
  int smallType;// 0非小件 1小件

  PutatayPOL3.fromJson(Map<dynamic, dynamic> json)
      : tallyLpnInfoRespVos = json['tallyLpnInfoRespVos'] == null ? null : (new List<dynamic>.from(json['tallyLpnInfoRespVos']).map((userJson) => PutawayLpn.fromJson(userJson)).toList()),
        skuAndQtyReqVos = json['skuAndQtyReqVos'] == null ? null : (new List<dynamic>.from(json['skuAndQtyReqVos']).map((userJson) => PutawayLPNSkus.fromJson(userJson)).toList()),
        skus = json['skus'] == null ? null : (new List<dynamic>.from(json['skus']).map((userJson) => PutawayLPNSkus.fromJson(userJson)).toList()),
        prescribedLocation = json['prescribedLocation'] as String,
        lpn = json['lpn'] as String,
        type = json['type'] as int,
        isWhiteList = json['isWhiteList'] as bool,
        smallType = json['smallType'] as int;

}
class PutatayFeedbackQr{
  String location;//库位号
  String status;//异常状态 已满:full、异常:abnormal
  String abnormalDesc;//异常描述

  Map<String, dynamic> toJson() => {
    'location': location,
    'status': status,
    'abnormalDesc': abnormalDesc,
  };
}

class PutawayLocationQr{
  String inbound_lpn;
  String location;
  String prescribedLocation;
  String sku_barcode;
  int quantity;
  String category = "LPN";////上架类型sku/lpn
  String processType;
  String inventoryType;
  int version;

  Map<String, dynamic> toJson() => {
    'inbound_lpn': inbound_lpn,
    'location': location,
    'prescribedLocation': prescribedLocation,
    'sku_barcode': sku_barcode,
    'quantity': quantity,
    'category': category,
    'processType': processType,
    'inventoryType': inventoryType,
    'version': version,
  };
}

